<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkProgressBar</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="DisplayWidgets.html" title="显示构件">
<link rel="prev" href="gtk3-GtkLabel.html" title="GtkLabel">
<link rel="next" href="gtk3-GtkStatusbar.html" title="GtkStatusbar">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-GtkLabel.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="DisplayWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-GtkStatusbar.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-GtkProgressBar.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-GtkProgressBar.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-GtkProgressBar"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-GtkProgressBar.top_of_page"></a>GtkProgressBar</span></h2>
<p>GtkProgressBar — A widget which indicates progress visually</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-GtkProgressBar.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar">GtkProgressBar</a>;
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-new" title="gtk_progress_bar_new ()">gtk_progress_bar_new</a>                (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-pulse" title="gtk_progress_bar_pulse ()">gtk_progress_bar_pulse</a>              (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-fraction" title="gtk_progress_bar_set_fraction ()">gtk_progress_bar_set_fraction</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> fraction</code></em>);
<a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-get-fraction" title="gtk_progress_bar_get_fraction ()">gtk_progress_bar_get_fraction</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-inverted" title="gtk_progress_bar_set_inverted ()">gtk_progress_bar_set_inverted</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> inverted</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-get-inverted" title="gtk_progress_bar_get_inverted ()">gtk_progress_bar_get_inverted</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-show-text" title="gtk_progress_bar_set_show_text ()">gtk_progress_bar_set_show_text</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_text</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-get-show-text" title="gtk_progress_bar_get_show_text ()">gtk_progress_bar_get_show_text</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-text" title="gtk_progress_bar_set_text ()">gtk_progress_bar_set_text</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-get-text" title="gtk_progress_bar_get_text ()">gtk_progress_bar_get_text</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-ellipsize" title="gtk_progress_bar_set_ellipsize ()">gtk_progress_bar_set_ellipsize</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a> mode</code></em>);
<a href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="returnvalue">PangoEllipsizeMode</span></a>  <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-get-ellipsize" title="gtk_progress_bar_get_ellipsize ()">gtk_progress_bar_get_ellipsize</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-pulse-step" title="gtk_progress_bar_set_pulse_step ()">gtk_progress_bar_set_pulse_step</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> fraction</code></em>);
<a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-get-pulse-step" title="gtk_progress_bar_get_pulse_step ()">gtk_progress_bar_get_pulse_step</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gtk3-GtkProgressBar.description"></a><h2>Description</h2>
<p>
The <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> is typically used to display the progress of a long
running operation.  It provides a visual clue that processing
is underway.  The <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> can be used in two different
modes: percentage mode and activity mode.
</p>
<p>
When an application can determine how much work needs to take place
(e.g. read a fixed number of bytes from a file) and can monitor its
progress, it can use the <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> in percentage mode and the user
sees a growing bar indicating the percentage of the work that has
been completed.  In this mode, the application is required to call
<a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-fraction" title="gtk_progress_bar_set_fraction ()"><code class="function">gtk_progress_bar_set_fraction()</code></a> periodically to update the progress bar.
</p>
<p>
When an application has no accurate way of knowing the amount of work
to do, it can use the <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> in activity mode, which shows
activity by a block moving back and forth within the progress area. In
this mode, the application is required to call <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-pulse" title="gtk_progress_bar_pulse ()"><code class="function">gtk_progress_bar_pulse()</code></a>
periodically to update the progress bar.
</p>
<p>
There is quite a bit of flexibility provided to control the appearance
of the <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>.  Functions are provided to control the
orientation of the bar, optional text can be displayed along with
the bar, and the step size used in activity mode can be set.
</p>
</div>
<div class="refsect1">
<a name="gtk3-GtkProgressBar.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkProgressBar"></a><h3>struct GtkProgressBar</h3>
<pre class="programlisting">struct GtkProgressBar {
  GtkWidget parent;
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-new"></a><h3>gtk_progress_bar_new ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_progress_bar_new                (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-pulse"></a><h3>gtk_progress_bar_pulse ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_progress_bar_pulse              (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);</pre>
<p>
Indicates that some progress is made, but you don't know how much.
Causes the progress bar to enter "activity mode," where a block
bounces back and forth. Each call to <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-pulse" title="gtk_progress_bar_pulse ()"><code class="function">gtk_progress_bar_pulse()</code></a>
causes the block to move by a little bit (the amount of movement
per pulse is determined by <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-pulse-step" title="gtk_progress_bar_set_pulse_step ()"><code class="function">gtk_progress_bar_set_pulse_step()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-set-fraction"></a><h3>gtk_progress_bar_set_fraction ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_progress_bar_set_fraction       (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> fraction</code></em>);</pre>
<p>
Causes the progress bar to "fill in" the given fraction
of the bar. The fraction should be between 0.0 and 1.0,
inclusive.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fraction</code></em> :</span></p></td>
<td>fraction of the task that's been completed</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-get-fraction"></a><h3>gtk_progress_bar_get_fraction ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             gtk_progress_bar_get_fraction       (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);</pre>
<p>
Returns the current fraction of the task that's been completed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a fraction from 0.0 to 1.0</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-set-inverted"></a><h3>gtk_progress_bar_set_inverted ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_progress_bar_set_inverted       (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> inverted</code></em>);</pre>
<p>
Progress bars normally grow from top to bottom or left to right.
Inverted progress bars grow in the opposite direction.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>inverted</code></em> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to invert the progress bar</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-get-inverted"></a><h3>gtk_progress_bar_get_inverted ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_progress_bar_get_inverted       (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);</pre>
<p>
Gets the value set by <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-inverted" title="gtk_progress_bar_set_inverted ()"><code class="function">gtk_progress_bar_set_inverted()</code></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the progress bar is inverted</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-set-show-text"></a><h3>gtk_progress_bar_set_show_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_progress_bar_set_show_text      (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> show_text</code></em>);</pre>
<p>
Sets whether the progressbar will show text superimposed
over the bar. The shown text is either the value of
the <span class="type">"text"</span> property or, if that is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
the <span class="type">"fraction"</span> value, as a percentage.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>show_text</code></em> :</span></p></td>
<td>whether to show superimposed text</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-get-show-text"></a><h3>gtk_progress_bar_get_show_text ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_progress_bar_get_show_text      (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);</pre>
<p>
Gets the value of the <span class="type">"show-text"</span> property.
See <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-show-text" title="gtk_progress_bar_set_show_text ()"><code class="function">gtk_progress_bar_set_show_text()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if text is shown in the progress bar</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-set-text"></a><h3>gtk_progress_bar_set_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_progress_bar_set_text           (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>);</pre>
<p>
Causes the given <em class="parameter"><code>text</code></em> to appear superimposed on the progress bar.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
<td>a UTF-8 string, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-get-text"></a><h3>gtk_progress_bar_get_text ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       gtk_progress_bar_get_text           (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);</pre>
<p>
Retrieves the text displayed superimposed on the progress bar,
if any, otherwise <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The return value is a reference
to the text, not a copy of it, so will become invalid
if you change the text in the progress bar.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>text, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>; this string is owned by the widget
and should not be modified or freed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-set-ellipsize"></a><h3>gtk_progress_bar_set_ellipsize ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_progress_bar_set_ellipsize      (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a> mode</code></em>);</pre>
<p>
Sets the mode used to ellipsize (add an ellipsis: "...") the text
if there is not enough space to render the entire string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>a <a href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-get-ellipsize"></a><h3>gtk_progress_bar_get_ellipsize ()</h3>
<pre class="programlisting"><a href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="returnvalue">PangoEllipsizeMode</span></a>  gtk_progress_bar_get_ellipsize      (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);</pre>
<p>
Returns the ellipsizing position of the progressbar.
See <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-ellipsize" title="gtk_progress_bar_set_ellipsize ()"><code class="function">gtk_progress_bar_set_ellipsize()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td><a href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a></td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-set-pulse-step"></a><h3>gtk_progress_bar_set_pulse_step ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_progress_bar_set_pulse_step     (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> fraction</code></em>);</pre>
<p>
Sets the fraction of total progress bar length to move the
bouncing block for each call to <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-pulse" title="gtk_progress_bar_pulse ()"><code class="function">gtk_progress_bar_pulse()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fraction</code></em> :</span></p></td>
<td>fraction between 0.0 and 1.0</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-progress-bar-get-pulse-step"></a><h3>gtk_progress_bar_get_pulse_step ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             gtk_progress_bar_get_pulse_step     (<em class="parameter"><code><a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a> *pbar</code></em>);</pre>
<p>
Retrieves the pulse step set with <a class="link" href="gtk3-GtkProgressBar.html#gtk-progress-bar-set-pulse-step" title="gtk_progress_bar_set_pulse_step ()"><code class="function">gtk_progress_bar_set_pulse_step()</code></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkProgressBar.html#GtkProgressBar" title="struct GtkProgressBar"><span class="type">GtkProgressBar</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a fraction from 0.0 to 1.0</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>